/*
 * @Author: Jiraiya
 * @Date: 2020-05-12 15:30:44
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-05-12 16:35:23
 * @Description: 
 */
const React = {
    Children: {
        map,
        forEach,
        count,
        toArray,
        only,
    },
    createRef,
    Component,
    PureComponent,

    createContext,
    forwardRef,
    lazy,
    memo,

    Fragment: REACT_FRAGMENT_TYPE,
    StrictMode: REACT_STRICT_MODE_TYPE,
    Suspense: REACT_SUSPENSE_TYPE,

    createElement,
    cloneElement,
    createFactory,
    isValidElement,

    version,

    __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
}


React.ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;

// 第一步 Babel现将JSX转为React对象

const App = ( ) => {
    return <div>组件</div>
}
<div id='root' className='root'>
    1
    <p>哈哈</p>
    <App />
</div>


// 转换结果
"use strict";

var App = function App() {
  return /*#__PURE__*/React.createElement("div", null, "\u7EC4\u4EF6");
};

/*#__PURE__*/
React.createElement("div", {
  id: "root",
  className: "root"
}, "1", /*#__PURE__*/React.createElement("p", null, "\u54C8\u54C8"), /*#__PURE__*/React.createElement(App, null));

// 查看 React.createElement()

// 查看Compoent和PureComponent

// 查看createRef

// 查看forwardRef
